/**
 * Created with IntelliJ IDEA.
 * Description:
 */

import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int k = 0;
        do{
            k = n % 10;
            n /= 10;
            System.out.print( k );
        }while(n != 0);
    }
}
